﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace TankBattle.Models
{
    public class StaticAutoTank: AutoTank
    {
        #region Variable

        #endregion 

        #region Construction 

        public StaticAutoTank()
        { }
        public StaticAutoTank(Texture2D texture, Vector2 position, int width, int height)
            : base(texture, position, width, height, Constant.ZERO)
        { }
        public StaticAutoTank(Texture2D texture, Vector2 position, int flag)
            : base(texture, position, Constant.TANK_SIZE_WIDTH, Constant.TANK_SIZE_HEIGHT, Constant.ZERO)
        { }

        #endregion 

        #region Properties

        #endregion 

        #region Main Function
        public override void Move(List<GameObject> obstructions)
        {
            return;
        }
        public List<Bullet> Shoot(Texture2D texture)
        {
            List<Bullet> bullets = new List<Bullet>();

            bullets.Add(new Bullet(texture,
                GetBulletPosition(Constant.MOVE_DOWN),
                Constant.MOVE_DOWN, 
                bulletType));
            bullets.Add(new Bullet(texture,
                GetBulletPosition(Constant.MOVE_UP),
                Constant.MOVE_UP,
                bulletType));
            bullets.Add(new Bullet(texture,
                GetBulletPosition(Constant.MOVE_RIGHT),
                Constant.MOVE_RIGHT,
                bulletType));
            bullets.Add(new Bullet(texture,
                GetBulletPosition(Constant.MOVE_LEFT),
                Constant.MOVE_LEFT,
                bulletType));

            return bullets;
        }
        protected override void Intallization(Texture2D texture, Vector2 position, int width, int height)
        {
            base.Intallization(texture, position, width, height);
            sprite = new Sprite(texture,
                new Vector2(60, 60),
                new Vector2(4, 1),
                1, true);
        }
        public override bool Update()
        {
            sprite.Update();

            return base.Update();
        }
        #endregion

        #region Other Function

        #endregion
    }
}
